<script lang="ts" setup>
import {onLaunch, onShow, onHide} from "@dcloudio/uni-app";
import {useUserInfoStoreHook} from "@/store/modules/user-info";

onLaunch(() => {
  /**
   * @deprecated 测试用, 实际项目请删除
   * 1.测试 pinia store 的使用与持久化
   * 2.测试环境变量是否生效
   *  */
  console.log("App Launch");
  useUserInfoStoreHook().setUserInfoData({name: '刘德华'})
  console.log('useUserInfoStoreHook:', useUserInfoStoreHook().userInfoData)
  console.log(import.meta.env.VITE_APP_ENV)
});
onShow(() => {
  console.log("App Show");
});
onHide(() => {
  console.log("App Hide");
});
</script>
<style lang="scss">
/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
@import "uview-plus/index.scss";
</style>
